<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<base href="http://localhost:8080/Barbr/">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>会员管理</title>
	<link rel="stylesheet" href="layui-v2.6.8/layui/css/layui.css">
	<link rel="stylesheet" href="css/MembershipManagement.css">
	<link rel="shortcut icon" href="img/hair.png">
	<script src="js/jquery-1.12.4.min.js"></script>
	<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo layui-hide-xs layui-bg-black">H·Y</div>
		<!-- 头部区域（可配合layui 已有的水平导航） -->
		<ul class="layui-nav layui-layout-right">
			<li class="layui-nav-item layui-hide layui-show-md-inline-block">
				<a href="javascript:;">
					<img src="img/geren.png" class="layui-nav-img">
					<span id="username">${sessionScope.username}</span>			<!--登录用户的名字-->
				</a>
				<dl class="layui-nav-child">
					<dd><a href="html/Personal_Information.jsp">个人信息</a></dd>
					<dd><a href="logout">退出登录</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
				<a href="javascript:;">
					<i class="layui-icon layui-icon-more-vertical"></i>
				</a>
			</li>
		</ul>
	</div>

	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll">
			<ul class="layui-nav layui-nav-tree" lay-filter="test">
				<li class="layui-nav-item layui-nav-itemed">
					<a class="layui-nav-item" href="html/MembershipManagement.jsp">会员管理</a>
				</li>
				<li class="layui-nav-item">
					<a href="html/investMoney.jsp">充值与查询</a>
				</li>
				<li class="layui-nav-item">
					<a href="html/addMembership.jsp">办理会员卡</a>
				</li>
				<li class="layui-nav-item">
					<a href="html/operation.jsp">会员操作记录</a>
				</li>
				<li class="layui-nav-item"><a href="html/Personal_Information.jsp">个人信息</a></li>
			</ul>
		</div>
	</div>

	<div class="layui-body">
		<div style="padding: 25px;">
			<label>搜索:<input type="text" id="selectTel" placeholder="输入顾客手机号码/姓名"><button type="button" id="selectVal" onclick="searchUser()" class="layui-btn layui-btn-normal layui-btn-radius">搜索</button></label>
			<table id="select">
				<thead>
					<tr>
						<th>ID</th>
						<th>姓名</th>
						<th>电话号码</th>
						<th>卡型</th>
						<th>剪发次数</th>
						<th>烫发次数</th>
						<th>护理次数</th>
						<th>补发根次数</th>
						<th>染发次数</th>
						<th>洗发次数</th>
						<th>黑油次数</th>
						<th>理发师等级</th>
						<th>最近操作时间</th>
						<th>操作</th>
					</tr>
				<tr v-for="(list_index,list) in lists"> <!--:key="list_index"-->
					<td>{{list.id}}</td>
					<td >{{list.username}}</td>
					<td id="tell">{{list.tellphone}}</td>
					<td>{{list.type}}</td>
					<td>{{list.haircut}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('haircut','{{list.haircut}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.perm}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('perm','{{list.perm}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.wash_protect}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('wash_protect','{{list.wash_protect}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.hairroot}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('hairroot','{{list.hairroot}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.colour}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('colour','{{list.colour}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.wash}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('wash','{{list.wash}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>{{list.black}}<button type="button" class="layui-btn layui-btn-sm" onclick="mreduce('black','{{list.black}}','{{list.tellphone}}','{{list.id}}')">-1</button></td>
					<td>
						<select class="lev" id="{{list.id}}">
							<option value="选择理发师" selected>选择理发师</option>
							<c:forEach items="${sessionScope.barber}" var="item">
								<option value="${item.username}:${item.level}级">${item.username}:${item.level}级</option>
							</c:forEach>
						</select>
					</td>
					<td>{{list.latest_operating_time}}</td>
					<td><button type="button" class="layui-btn layui-btn-sm" onclick="{if(confirm('确定要删除该用户吗?')) {deleteCurrentRow(this,'{{list.tellphone}}'); }else {}}">删除</button></td>
				</tr>
				</thead>
			</table>
		</div>
	</div>
	<div class="layui-footer" style="text-align:center;">
	H·Y
	</div>
</div>
<script src="layui-v2.6.8/layui/layui.js"></script>
<script src="js/Membership.js"></script>
</body>
</html>
